package com.sgb.kjwl.model.api;

import com.sgb.kjwl.model.entity.ParentAreaEntity;
import com.sgb.kjwl.model.entity.SearchMailEntity;
import com.sgb.kjwl.model.entity.ShopImEntity;
import com.sgb.kjwl.model.entity.supplier3.DictEntity3;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Description: 整个应用多个地方会用到的相关接口
 * Author zhengkewen
 * Time 2019/10/10
 */
public interface CommonInterface {

    //获取店铺商家的IM信息
    @GET("v1/app/user/store/queryStoreImToken")
    Observable<BaseEntity<ShopImEntity>> getShopImInfo(@Query("shopId") String shopId);

    //搜索通讯录联系人
    @POST("v1/app/management/addressListSearch")
    Observable<BaseEntity<List<SearchMailEntity>>> searchMailList(@Query("text") String condition);

    //获取所在地区二级三级
    @GET("v1/app/common/getAreaSecondAndThird")
    Observable<BaseEntity<List<ParentAreaEntity<List<ParentAreaEntity>>>>> getAreaSecondAndThird(@Query("areaCode") String areacode);

    //获取二级地区
    @POST("v1/app/common/getAreaSecond")
    Observable<BaseEntity<List<DictEntity3>>> getAreaSecond(@Query("areaCode") String areaCode);

    //获取二级地区(单选带全部的)
    @POST("v1/app/common/getAreaSecondV1")
    Observable<BaseEntity<List<DictEntity3>>> getAreaSecond2(@Query("areaCode") String areaCode);
}

